package ru.slovoslovo.cropmotion;

import org.eclipse.swt.widgets.Display;

import ru.slovoslovo.cropmotion.ui.MainWindow;


public class CropMotion {   
    /**
     * Launch the application.
     * 
     * @param args
     */
    public static void main(String args[]) {
        CropSettings settings = new CropSettings().deserialize(CropSettings.LOCATION);
        if (settings == null){
            settings = new CropSettings();
            settings.serialize(CropSettings.LOCATION);
        }
        
        try {
            MainWindow window = new MainWindow(settings);
            window.setBlockOnOpen(true);
            window.open();
            
            Display.getCurrent().dispose();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
